<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>


<script>
    var json = {
        name:'张三',
        qq:'747591335',
        showName:function () {
            alert("我的名字："+this.name);
            //方法属于谁，this就是谁，this是指json
        }
    };

    json.showName();

</script>
</body>
</html>